#include "tcp_server.hpp"
#include <memory>

void Usage(const char *proc)
{
    printf("Usage: %s port\n", proc);
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        return 1;
    }
    uint16_t port = atoi(argv[1]);
    std::unique_ptr<TcpServer> psvr(new TcpServer(port));
    psvr->InitServer();
    psvr->Start();
    return 0;
}